Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for PostgreSQL #21

Merged
merged 6 commits into from
Oct 28, 2024
Merged

Add support for PostgreSQL #21

merged 6 commits into from
Oct 28, 2024

Conversation

kysrpex
Copy link
Contributor

@kysrpex kysrpex commented Jul 4, 2024

Support loading mappings from PostgreSQL via the pg-native library. A major problem was that the proxy works watching files for changes (SQLite or JSON files). With PostgreSQL this is not possible, so I resorted to polling at regular intervals (configurable via the new --pollingInterval command line option) and PostgreSQL asynchronous notifications. See the new function watchPostgres and new section of the README for more details.

As a side effect, running the proxy requires nodejs v14 now. I have also included a package-lock.json file and version specifiers for axios, axios-retry, chai and mocha.

This feature is meant to work in conjunction with galaxyproject/galaxy#18481.

kysrpex added 4 commits June 19, 2024 14:16
Pin project dependencies to a set known to work using package-lock.json.
Support loading mappings from PostgreSQL via the `pg-native` library.
@kysrpex
Copy link
Contributor Author

kysrpex commented Sep 5, 2024

galaxyproject/galaxy#18481 got merged, this PR would be the next step. From Git blame, it looks like the original maintainer was @jmchilton.

@jmchilton are you still a contact person for this repository? Who should I contact otherwise?

lib/mapper.js Outdated
var postgresClient = require("pg-native");
var watchFile = require("node-watch");

var startsWith = function (subjectString, searchString) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we re-implementing startsWith and endsWith ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nonsense, I agree. Changed to built-in JavaScript methods in 80183d2.

Copy link
Member

@mvdbeek mvdbeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, seems fine to me.

@kysrpex
Copy link
Contributor Author

kysrpex commented Oct 21, 2024

@mvdbeek Sorry for not answering earlier, I was out of office. Thanks for the review.

I do not have permission to merge PRs to this repository. Could you merge it, then #22 to bump the version number and finally create a new tag v0.1.0?

@natefoo natefoo merged commit 9560df4 into galaxyproject:main Oct 28, 2024
@kysrpex kysrpex deleted the postgres branch October 29, 2024 07:18
@kysrpex
Copy link
Contributor Author

kysrpex commented Oct 29, 2024

Thanks @natefoo!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants